/**
 * @summary 用户模块
 * @author 陈俊可
 * @description
 *      这是个菜鸡
 */
import * as getUserApi from '@/api/user'


export default {
  namespaced: true,
  state: {
    // 用户个人信息
    userProfile: {},
  },

  mutations: {
    SET_USER_PROFILE(state, newValue) {
      state.userProfile = newValue;
    },
  },
  actions: {
    async updateUserProfile({ commit }) {
      const res = await getUserApi.getUserProfile();
      commit('SET_USER_PROFILE', res);
    },

  },
};
